package cn.edu.ntu.yyl;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

//(exclude = SecurityAutoConfiguration.class)
@SpringBootApplication
public class Main {

    //SpringBoot程序的主入口
    public static void main(String[] args) throws IOException
    {
        Properties properties = new Properties();
        //读取配置文件
        InputStream inputStream = Main.class.getClassLoader().getResourceAsStream("application.yml");
        //写入配置
        properties.load(inputStream);
        //new 一个Spring程序
        SpringApplication app = new SpringApplication(Main.class);
        //加载配置
        app.setDefaultProperties(properties);
        //启动应用
        app.run(args);

    }

}


